package com.tencent.mid.util;

import android.content.Context;
import android.os.Build;
import android.os.Build.VERSION;
import android.util.DisplayMetrics;
import java.util.Locale;
import java.util.TimeZone;
import org.json.JSONArray;
import org.json.JSONObject;

class f
{
  String a;
  String b = "2.2";
  DisplayMetrics c;
  int d = Build.VERSION.SDK_INT;
  String e = Build.MODEL;
  String f = Build.MANUFACTURER;
  String g = Locale.getDefault().getLanguage();
  String h;
  String i;
  String j;
  String k;
  int l = 0;
  String m = null;
  Context n = null;
  private String o = null;
  private String p = null;
  private String q = null;
  private String r = null;

  private f(Context paramContext)
  {
    this.n = paramContext;
    this.c = h.a(paramContext);
    this.a = h.c(paramContext);
    this.i = h.b(paramContext);
    this.j = TimeZone.getDefault().getID();
    this.k = h.f(paramContext);
    this.m = paramContext.getPackageName();
    this.r = h.a();
  }

  void a(JSONObject paramJSONObject)
  {
    paramJSONObject.put("sr", this.c.widthPixels + "*" + this.c.heightPixels);
    Util.jsonPut(paramJSONObject, "av", this.a);
    Util.jsonPut(paramJSONObject, "ch", this.h);
    Util.jsonPut(paramJSONObject, "mf", this.f);
    Util.jsonPut(paramJSONObject, "sv", this.b);
    Util.jsonPut(paramJSONObject, "ov", Integer.toString(this.d));
    paramJSONObject.put("os", 1);
    Util.jsonPut(paramJSONObject, "op", this.i);
    Util.jsonPut(paramJSONObject, "lg", this.g);
    Util.jsonPut(paramJSONObject, "md", this.e);
    Util.jsonPut(paramJSONObject, "tz", this.j);
    if (this.l != 0)
      paramJSONObject.put("jb", this.l);
    Util.jsonPut(paramJSONObject, "sd", this.k);
    Util.jsonPut(paramJSONObject, "apn", this.m);
    if ((Util.isNetworkAvailable(this.n)) && (Util.isWifiNet(this.n)))
    {
      localObject = new JSONObject();
      Util.jsonPut((JSONObject)localObject, "bs", Util.getWiFiBBSID(this.n));
      Util.jsonPut((JSONObject)localObject, "ss", Util.getWiFiSSID(this.n));
      if (((JSONObject)localObject).length() > 0)
        Util.jsonPut(paramJSONObject, "wf", ((JSONObject)localObject).toString());
    }
    Object localObject = Util.getWifiTopN(this.n, 10);
    if ((localObject != null) && (((JSONArray)localObject).length() > 0))
      Util.jsonPut(paramJSONObject, "wflist", ((JSONArray)localObject).toString());
    Util.jsonPut(paramJSONObject, "sen", this.o);
    Util.jsonPut(paramJSONObject, "cpu", this.p);
    Util.jsonPut(paramJSONObject, "ram", this.q);
    Util.jsonPut(paramJSONObject, "rom", this.r);
  }
}